Integrand size = 37, antiderivative size = 52 \[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=(A b+a B) x+\frac {(b B+a C) \text {arctanh}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {4161, 4132, 8, 4130, 3855} \[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=x (a B+A b)+\frac {a A \sin (c+d x)}{d}+\frac {(a C+b B) \text {arctanh}(\sin (c+d x))}{d}+\frac {b C \tan (c+d x)}{d} \]
[In]
[Out]
Rule 8
Rule 3855
Rule 4130
Rule 4132
Rule 4161
Rubi steps \begin{align*} \text {integral}& = \frac {b C \tan (c+d x)}{d}+\int \cos (c+d x) \left (a A+(A b+a B) \sec (c+d x)+(b B+a C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {b C \tan (c+d x)}{d}+(A b+a B) \int 1 \, dx+\int \cos (c+d x) \left (a A+(b B+a C) \sec ^2(c+d x)\right ) \, dx \\ & = (A b+a B) x+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d}+(b B+a C) \int \sec (c+d x) \, dx \\ & = (A b+a B) x+\frac {(b B+a C) \text {arctanh}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d} \\ \end{align*}
Time = 0.01 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.37 \[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=A b x+a B x+\frac {b B \text {arctanh}(\sin (c+d x))}{d}+\frac {a C \text {arctanh}(\sin (c+d x))}{d}+\frac {a A \cos (d x) \sin (c)}{d}+\frac {a A \cos (c) \sin (d x)}{d}+\frac {b C \tan (c+d x)}{d} \]
[In]
[Out]
Time = 0.47 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.42
method | result | size |
derivativedivides | \(\frac {a A \sin \left (d x +c \right )+a B \left (d x +c \right )+C a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+A b \left (d x +c \right )+B b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \tan \left (d x +c \right ) b}{d}\) | \(74\) |
default | \(\frac {a A \sin \left (d x +c \right )+a B \left (d x +c \right )+C a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+A b \left (d x +c \right )+B b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \tan \left (d x +c \right ) b}{d}\) | \(74\) |
parallelrisch | \(\frac {-2 \cos \left (d x +c \right ) \left (B b +C a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+2 \cos \left (d x +c \right ) \left (B b +C a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+a A \sin \left (2 d x +2 c \right )+2 d x \left (A b +a B \right ) \cos \left (d x +c \right )+2 C \sin \left (d x +c \right ) b}{2 d \cos \left (d x +c \right )}\) | \(108\) |
risch | \(A b x +a B x -\frac {i a A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i a A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i C b}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B b}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B b}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(143\) |
norman | \(\frac {\left (A b +a B \right ) x +\left (-A b -a B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-A b -a B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (A b +a B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {2 \left (a A -C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+\frac {2 \left (a A +C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {4 a A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}+\frac {\left (B b +C a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {\left (B b +C a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(217\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.94 \[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (B a + A b\right )} d x \cos \left (d x + c\right ) + {\left (C a + B b\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (C a + B b\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a \cos \left (d x + c\right ) + C b\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]
[In]
[Out]
\[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right ) \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.77 \[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (d x + c\right )} B a + 2 \, {\left (d x + c\right )} A b + C a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + B b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A a \sin \left (d x + c\right ) + 2 \, C b \tan \left (d x + c\right )}{2 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (52) = 104\).
Time = 0.30 (sec) , antiderivative size = 134, normalized size of antiderivative = 2.58 \[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (B a + A b\right )} {\left (d x + c\right )} + {\left (C a + B b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (C a + B b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1}}{d} \]
[In]
[Out]
Time = 16.59 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.94 \[ \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C\,b\,\mathrm {tan}\left (c+d\,x\right )}{d}+\frac {2\,A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a\,\sin \left (2\,c+2\,d\,x\right )}{2\,d\,\cos \left (c+d\,x\right )} \]
[In]
[Out]